<template>
    <menu-bar class="mb" :menus="menus" :currentPath="currentPath"></menu-bar>
    <router-view></router-view>  
</template>

<script>
import MenuBar from '@/components/MenuBar'
import useMenu from './hooks/useMenu'
export default {
    name: 'Main',
    components: {    
        MenuBar
    },    
    setup() {
        const { menus, currentPath } = useMenu()
        return {
            menus,
            currentPath
        }
    }
}
</script>

<style lang="scss" scoped>
    .mb {
        position: sticky;
        top: 44px;
        z-index: 99;
    }
</style>